Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/process command #3

Merged
merged 21 commits into from
Nov 2, 2017
Merged

Feature/process command #3

merged 21 commits into from
Nov 2, 2017

Conversation

maxgrossman
Copy link
Contributor

  • processing scripts and pipeline to translate admin shapefile into PostGIS table

...the cleaning steps within the pipeline that handle geometry issues still need to be added.

However, given the modularity of the pipeline and usefulness of feedback, its a good time for a pr.
I will make the branch for cleaning a branch off of this branch.

pipeline implemented. next steps are to include the insert-tables script (the final step for adding data into postgis table)
as well as cleaning scripts that clean geometries
insert into file inserts geojson features as rows into openroads-vn database. the connection file builds the connection needed to do so
.gitignore Outdated
@@ -0,0 +1,3 @@
node_modules
**/*/.DS_store

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small thing: remove .DS_Stores that have already been committed when this line came in.

geo: st.geomFromGeoJSON(geometry),
name_en: properties.en_name,
name_vn: ''
}).into(`${admin}-table`).toString();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't all levels of boundaries live in the same admin table? That's how I have it set up, and how we did it for ORMA Philippines. With one table, it's easier to query, and self-joins make it as versatile as multiple tables (eg, SELECT child.name_en FROM admin_areas AS parent JOIN admin_areas AS child ON parent.id=child.parent_id WHERE parent.id='12345'). Plus, then it's portable to different countries (which would have different names for their admin levels).

Copy link
Contributor Author

@maxgrossman maxgrossman Sep 15, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For sure they can all live in the same table / they need to if that is how you have things set up! I'll make the changes to that script we're doing the right insert.

the 'delete holes' module has been added to the pipeline. next to be added is the initial cleaning module
Copy link

@mileswwatkins mileswwatkins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good in general, especially if you've gone over it thoroughly with @kamicut. Left a couple notes.

@maxgrossman
Copy link
Contributor Author

remaining work for the pipe includes #6 and #7

@mileswwatkins
Copy link

There's not time right now to review this huge PR, nor can Max make changes to it. Devseed can make tweaks down the road if needed, and @sarahantos is also promising us a better source shapefile which might obviate this!

@mileswwatkins mileswwatkins merged commit 2baee54 into develop Nov 2, 2017
@mileswwatkins mileswwatkins deleted the feature/process-command branch November 2, 2017 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants